start;
fGNSS = fopen('2021-6-1-12-1-7.g15','rb');

gps = zeros(3600,15);
k=1;

while 1
    syscntms = fread(fGNSS,1,'int32');
    if (isempty(syscntms))
        break;
    end
    gps(k,1) = syscntms;
    gps(k,2:4) = fread(fGNSS,3,'int32');
    gps(k,5:7) = fread(fGNSS,3,'single');
    gps(k,8:9) = fread(fGNSS,2,'double');
    gps(k,10:11) = fread(fGNSS,2,'single');
    gps(k,12) = fread(fGNSS,1,'int8');
    gps(k,13) = fread(fGNSS,1,'single');
    gps(k,14) = fread(fGNSS,1,'int8');
    gps(k,15) = fread(fGNSS,1,'int16');
    k = k+1;
end

fclose(fGNSS);

gps = gps(1:k-1,:);



